<template>
	<view class="content">
		<view class="content-block">
			<view class="title">{{detail.configIdText}}</view>
			<view class="article-content">
				<mp-html :content="detail.introduce" />
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getTrainSpecialityByIdApi
	} from '@/api/train.js';
	export default {
		data() {
			return {
				userIdentity: 0,
				detail: {
					configIdText: '',
					introduce: ''
				},
				id: null,
			}
		},
		methods: {
			getNew(id) {
				getTrainSpecialityByIdApi({
					id: this.id
				}).then((res) => {
					console.log(res)
					this.detail = res
				}).catch((res) => {
				})
			},
		},
		onLoad(e) {
			this.id = e.id;
			this.getNew();

		},
		onShow() {
			this.userIdentity = this.$store.state.userIdentity;
		}
	}
</script>

<style lang="scss">
	page {
		background: #EFEFEF;
	}
	img {
		max-width: 100%;
	}
	.content {
		width: 100%;
		padding-bottom: 20rpx;
		background-color: #fff;
		.content-block {
			background-color: #fff;
			padding: 30rpx;
			min-height: 100vh;

			.title {
				text-align: center;
				font-size: 40rpx;
				font-weight: bold;
				margin-bottom: 30rpx;
			}

			.sub-title {
				font-size: 28rpx;
				color: #999;
				margin-bottom: 30rpx;
			}
		}


	}
</style>
